The present invention relates to computer-implemented typesetting.
Printers have long used ligatures to improve the visual appearance of printed text. A ligature is a single printed or written glyph representing multiple characters that appear at adjacent positions in a word. A glyph is a typographical unit of a font, the design and appearance of which is defined by the font designer. Common examples of character combinations that can be printed as ligature glyphs in the English and German languages are the combinations, xe2x80x9cffxe2x80x9d, xe2x80x9cfixe2x80x9d and xe2x80x9cffixe2x80x9d, each of which may appear in many fonts as a single glyph.
Some computer applications and operating systems support the automatic display of ligatures on a video monitor or on a printed page. Such programs display a ligature glyph everywhere the ligature occurs, without regard to the glyph""s effect on text quality or word meaning. In many languages, including English, automatically displaying a ligature glyph in this manner usually improves, and only rarely reduces, the quality of the appearance of the text. However, automatically placing a ligature glyph in certain word positions, such as at the boundary between words in a compound word, may degrade appearance and may even change the meaning of the word. German typesetters in particular follow precise rules on the use of ligatures, which are set forth in the German Duden, to avoid improper alteration of textual appearance and meaning. Existing ligature insertion algorithms do not always comply with these rules.
In one aspect, the invention relates to the use of a computer in determining whether to use a ligature glyph in place of adjacent non-ligature characters in a word. First, adjacent non-ligature characters that can be represented by a ligature glyph are identified in the word. A test then is applied to determine whether the characters occur at a position in the word at which the ligature glyph is allowed to appear. The ligature glyph is used in place of the adjacent characters only if the test is satisfied.
In some embodiments applying the test includes retrieving from a table a list of one or more positions within the word at which no ligature glyph is allowed to appear. The word itself is used as a key to retrieve the list from the table. Language information can be used to select the table from a group of language-specific tables. In other embodiments, applying the test includes applying a language-independent rule that governs whether a ligature glyph can appear at the position at which the adjacent characters occur. One such language-independent rule is a rule that prevents the ligature from appearing at the boundary between words in a compound word. In alternative embodiments, the ligature glyph is used in place of the adjacent characters only when the word is rendered on a display, such as a computer monitor or a printed page, or the ligature glyph is used to replace the adjacent characters in an underlying electronic representation of the word, such as in an electronic copy of a word processing document.
In another aspect of the invention, a computer determines whether to use a ligature glyph in place of adjacent non-ligature characters by receiving information identifying a word, using this information to retrieve from a look-up table a list of one or more positions in the word at which no ligature is allowed to appear, and applying the list in determining whether to display the ligature glyph in place of the adjacent characters. In some embodiments, the computer receives information identifying a language with which the word is associated and uses this information to select the look-up table from a group of language-specific look-up tables.